Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: Change the parent document of a response document
~Delores Zenniverlen 28.Jan.04 12:51 AM a Web browser
Applications Development 6.0.3 Windows 2000


This is code I run in an agent (could be querysave) which updates a Parent doc when Response is saved.
You can use the document UNID as the key
***********
' PURPOSE: Updates Staff version of Student Docs (Parent Doc) when a Student changes their profile (Response doc)
' get the current document key (NotesName)
' go out to the view and walk the documents
' change the status to newMode
Dim doc As NotesDocument
Dim db As NotesDatabase
Dim view As NotesView
Dim docBackend As NotesDocument
Dim uidoc As notesuidocument
Dim thisKey As String
Dim thisNewKey As String'

Dim ws As New NotesUIWorkspace
Set uidoc = ws.currentdocument
Set doc = uidoc.document
Dim session As New NotesSession
Dim entry As NotesViewEntry
Dim vc As NotesViewEntryCollection

Set db = session.CurrentDatabase

thisKey = doc.NotesName(0)

Set view = db.GetView( "vLuSS" )
Set vc = view.GetAllEntriesByKey( thisKey )

Set entry = vc.GetFirstEntry()
If entry Is Nothing Then

Exit Sub
Else
Do While True
Set docBackend = entry.Document

docBackend.Parent= doc.Parent(0)
docBackend.HomeAddress = doc.HomeAddress(0)
docBackend.City= doc.City(0)
docBackend.State= doc.State(0)
docBackend.Zip= doc.Zip(0)
docBackend.PhoneNumber = doc.PhoneNumber(0)
docBackend.HMailAddress= doc.MailAddress(0)
docBackend.Industry = doc.Industry(0)
docBackend.Interest = doc.Interest(0)
docBackend.Ability = doc.Ability(0)
docBackend.Characteristics= doc.Characteristics(0)
docBackend.Skills = doc.Skills(0)
docBackend.JLocation= doc.JLocation(0)

Call docBackend.Save(True, True)
Set entry = vc.GetNextEntry( entry )
If entry Is Nothing Then

Exit Sub
End If

Loop
End If




Change the parent document of a res... (~Juan Brefreeli... 27.Jan.04)
. . RE: Change the parent document of a... (~Delores Zenniv... 28.Jan.04)
. . response.MakeResponse(parent) (WAS:... (~Delores Dwonic... 27.Jan.04)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS